import React, {useState} from 'react'

import {B} from "./B"
import {C} from "./C"

export const A:React.FC = ():JSX.Element=>{
  const [count, setCount] = useState(0)

  const handle=():void=>{
    console.log("click");
    setCount((preCount)=>preCount+1)
  }

  console.log("A update");
  
  return ( 
    <>
      <div>count:{count}</div>
      <B onClick={handle}/>
      <C />
    </>
  )
}
